package com.csp.app.service;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.csp.app.client.ServiceClient;
import com.csp.app.entity.ExamGroup;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class ExamGroupService {
    @Autowired
    private ServiceClient serviceClient;
    /**
     * 添加学生
     *
     * @param examGroup
     * @return
     */
    public boolean add(ExamGroup examGroup){
        return serviceClient.addExamGroup(examGroup);
    }

    /**
     * 批量添加学生
     *
     * @param examGroups
     * @return
     */
    public boolean batchAdd(List<ExamGroup> examGroups){
        return serviceClient.batchAddExamGroup(examGroups);
    }

    /**
     * 查询所有考试组
     *
     * @return
     */
    public List<ExamGroup> searchAll(){
        return serviceClient.searchAllExamGroup();
    }

    public Integer selectCount(EntityWrapper<ExamGroup> wrapper) {
        return serviceClient.selectExamGroupCount(wrapper);
    }
    public Page<ExamGroup> selectPage(Page<ExamGroup> page, EntityWrapper<ExamGroup> wrapper) {
        return serviceClient.selectExamGroupPage(page,wrapper);
    }
}
